import {ref, onMounted, onUnmounted} from 'vue'
export const useEventListener = (target, eventName, callback) => {
	onMounted(() => {
		target.addEventListener(eventName, callback)
	})
	onUnmounted(() => {
		target.removeEventListener(eventName, callback)
	})
}